package com.fire.market.product.api.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

@Data
@ApiModel(value = "添加商品参数")
public class ItemAddParam implements Serializable {
    //商品名称
    @NotNull(message = "商品的标题不能为空")
    @ApiModelProperty(value = "商品的标题",required=true)
    private String title;

    //商品价格
    @NotNull(message = "商品的价格不能为空")
    @ApiModelProperty(value = "商品的价格",required=true)
    private BigDecimal price;

    //商品的库存
    @NotNull(message = "商品的库存不能为空")
    @ApiModelProperty(value = "商品的库存",required=true)
    private Integer stock;

    //商品的描述
    @NotNull(message = "商品的描述不能为空")
    @ApiModelProperty(value = "商品的描述",required=true)
    private String description;

    //商品描述图片的url
    @NotNull(message = "商品的图片不能为空")
    @ApiModelProperty(value = "商品的图片",required=true)
    private String imgUrl;
}
